package com.nicy.dream.service.imp;

import com.nicy.dream.service.RLockService;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description:
 * @projectName:dream
 * @see:com.nicy.dream.service.imp
 * @author:NicyYe
 * @createTime:2021/3/4 10:32
 * @version:1.0
 */
@Service
@Slf4j
public class RLockServiceImp implements RLockService {

    @Autowired
    RedissonClient redissonClient;

    @Override
    public void getCount(Integer id) {
        RLock lock = redissonClient.getLock("hello");

    }
}
